import java.io.FileWriter;
import java.io.IOException;

public class FileWriterTest {
    public static void main ( String[] args ) {
        String root="E:\\\\hello.txt";
        try{
            FileWriter a1=new FileWriter(root);
            a1.write("你好\n");
            a1.write("java\n");
            a1.close();
        }catch(IOException e){
            System.out.println("Problem writing " +root );
        }
    }

}
